package com.xxy.usercenter.common;

import lombok.Getter;

/**
 * ClassName: ErrorCode
 * Package: com.xxy.usercenter.common
 * Description: 错误码
 *
 * @Author 十一
 * @Create 2024/11/14 16:07
 * @Version 1.0
 */
@Getter
public enum ErrorCode {

    SUCCESS(200, "请求成功", ""),

    PARAMS_ERROR(401, "请求参数错误", ""),

    NULL_ERROR(402, "请求数据为空", ""),

    NOT_LOGIN(403, "未登录", ""),

    NO_AUTH(405, "无权限", ""),

    SYSTEM_ERROR(500, "系统内部异常", "");

    /**
     * 状态码
     */
    private final int code;

    /**
     * 状态码信息
     */
    private final String message;

    /**
     * 状态码描述
     */
    private final String description;

    /**
     * 构造函数
     * @param code 状态码
     * @param message 状态码信息
     * @param description 状态码描述
     */
    ErrorCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

}
